package com.消除ifelse.责任链模式;

import org.springframework.stereotype.Service;

/**
 * @Date 2021/1/14 17:51
 * @Author WangLinBao
 * @Description
 */
@Service
public class WeiXinPayHandler extends PayHandler {
    @Override
    public void pay(String pay) {
        if("weixin".equals(pay)){
            System.out.println("weixin");
        }else{
            getNext().pay(pay);
        }
    }
}
